package com.zhida.chatservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author ling
 * @since 2024-07-19
 */
@Getter
@Setter
@TableName("group_message")
public class GroupMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "message_id", type = IdType.AUTO)
    private Integer messageId;

    @TableField("group_id")
    private Integer groupId;

    @TableField("come_from")
    private String comeFrom;

    @TableField("msg")
    private String msg;

    @TableField("create_time")
    private String createTime;

    @TableField("status")
    private String status;

    public GroupMessage(String groupId, String from, String createTime, String msg) {
        this.groupId = Integer.parseInt(groupId);
        this.comeFrom = from;
        this.createTime = createTime;
        this.msg = msg;
    }
}
